Skip to content

Wizard: let logged-out users browse and build official images - #4736

Closed
lucasgarfield wants to merge 4 commits into
lucas/cockpit/2-local-imagesfrom
lucas/cockpit/3-official-images
Closed

Wizard: let logged-out users browse and build official images#4736
lucasgarfield wants to merge 4 commits into
lucas/cockpit/2-local-imagesfrom
lucas/cockpit/3-official-images

Conversation

@lucasgarfield

Copy link
Copy Markdown
Collaborator

Registry login is no longer required to browse official images — logged-out users see the dropdown with pull disabled, and existence/auth checks stop going stale.

  • Drop the login-gated empty state and "Login required" label; the image dropdown is always shown
  • Logged-out users get an inline info alert offering registry login; pull buttons disabled with an explanatory tooltip
  • Re-check image existence (refetchOnMountOrArgChange) on mount, so a podman rmi outside the wizard is noticed
  • Re-check registry login on mount for the same staleness reason
  • Scope the pull button's busy/error state to the selected image, so switching images doesn't show a stale pulling state
  • Pull validation copy now tells the user how to resolve a missing image based on login state

Stack created with GitHub Stacks CLIGive Feedback 💬

@lucasgarfield
lucasgarfield requested a review from a team as a code owner August 10, 2026 17:53
@lucasgarfield
lucasgarfield requested review from ksiekl, mgold1234 and regexowl and removed request for a team August 10, 2026 17:53

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/3-official-images branch from 43dbf23 to c64c16e Compare August 10, 2026 18:17
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@lucasgarfield
lucasgarfield changed the base branch from lucas/cockpit/1-dev-registry to lucas/cockpit/2-local-images August 10, 2026 18:18
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.35897% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.98%. Comparing base (cb9ad33) to head (fdc321a).

Files with missing lines Patch % Lines
...s/ImageSourceSelect/OnPrem/OfficialImageSource.tsx 75.86% 7 Missing ⚠️
...ents/CreateImageWizard/utilities/useValidation.tsx 50.00% 3 Missing ⚠️

Impacted file tree graph

@@                       Coverage Diff                        @@
##           lucas/cockpit/2-local-images    #4736      +/-   ##
================================================================
+ Coverage                         78.20%   78.98%   +0.77%     
================================================================
  Files                               264      264              
  Lines                              7021     7033      +12     
  Branches                           2542     2548       +6     
================================================================
+ Hits                               5491     5555      +64     
+ Misses                             1437     1381      -56     
- Partials                             93       97       +4     
Flag Coverage Δ
playwright 59.78% <12.50%> (+0.71%) ⬆️
vitest 73.86% <74.35%> (+0.45%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...mponents/ImageSourceSelect/OnPrem/RegistryAuth.tsx 58.62% <100.00%> (+39.65%) ⬆️
...tput/components/ImageSourceSelect/OnPrem/index.tsx 75.00% <ø> (ø)
...ents/CreateImageWizard/utilities/useValidation.tsx 88.36% <50.00%> (-0.22%) ⬇️
...s/ImageSourceSelect/OnPrem/OfficialImageSource.tsx 77.77% <75.86%> (+21.52%) ⬆️

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb9ad33...fdc321a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/3-official-images branch from c64c16e to a2327c2 Compare August 11, 2026 11:18
@croissanne
croissanne force-pushed the lucas/cockpit/3-official-images branch from a2327c2 to c2e4bdf Compare August 11, 2026 12:39
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/3-official-images branch from c2e4bdf to 9fdba7b Compare August 11, 2026 13:46
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/3-official-images branch from 9fdba7b to c64c16e Compare August 11, 2026 15:51
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/3-official-images branch from c64c16e to 8e43b8e Compare August 12, 2026 11:53
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/3-official-images branch from 8e43b8e to de6b452 Compare August 12, 2026 12:53
The pull mutation's busy and error flags are hook-level, so switching
to another image while a pull was in flight kept showing the pulling
state on the newly selected image. Gate both flags on the mutation's
originalArgs matching the current selection. Cache refreshes are
unaffected: pull invalidates ImageExists per reference already.
The image-exists query result was served from the RTK Query cache, so
removing a container outside the wizard (podman rmi) went unnoticed
when the wizard was reopened. Pass refetchOnMountOrArgChange so the
existence check re-runs podman whenever the image source section is
shown; the wizard-level pull validation shares the same cache entries
and picks up the fresh result.
Same staleness as the image existence check: logging out via the CLI
went unnoticed because the auth status was served from the cache.
Re-run the check whenever the image source section is shown.
Registry login is only needed to pull images, so drop the login-gated
empty state and the "Login required" label. The image dropdown is now
always shown; a logged-out user instead sees an inline info alert
offering the registry login, and the pull buttons are disabled with an
explanatory tooltip.

When a selected image is missing from local storage, the pull
validation now says how to resolve it: logged in, it asks for a pull;
logged out, it points at the registry login. The auth status hook
gets the same hosted-safe conditional export as the image existence
check, since useImagePullValidation calls it unconditionally.
@lucasgarfield
lucasgarfield force-pushed the lucas/cockpit/3-official-images branch from de6b452 to fdc321a Compare August 13, 2026 15:23
@lucasgarfield

Copy link
Copy Markdown
Collaborator Author

Replaced by #4756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant